package ru.susu.algebra.centralunits.alternating.characters;

import java.io.PrintStream;

import org.apache.log4j.BasicConfigurator;

import ru.susu.algebra.io.FileUtilities;
import ru.susu.algebra.jtex.ITexDocument;

/**
 * Формирует документ, содержащий значения особых характеров
 *
 * @author akargapolov
 * @since: 05.10.2010
 */
public class SpecialCharactersDocumentGenerator
{
	private static final String FILENAME_PREFIX = "results/alternating";
	private static final String FILENAME = FILENAME_PREFIX + "/special_characters.tex";

	public static void main(String[] args) throws Exception
	{
		BasicConfigurator.configure();
		ITexDocument document = new SpecialCharactersSearcher().run(null);
		FileUtilities.makeDirectory(FILENAME_PREFIX);
		PrintStream stream = FileUtilities.createBufferedFilePrintStream(FILENAME);
		stream.write(document.generateContent().getBytes("cp1251"));
		//stream.write(document.generateContent().getBytes("utf8"));
		stream.close();
	}
}
